package biz.obake.team.touchprotector.ui;

import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import androidx.preference.ListPreference;
import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.c;
import biz.obake.team.touchprotector.g.a;
import biz.obake.team.touchprotector.qstile.QSTileLockService;
import biz.obake.team.touchprotector.qstile.QSTileSensorService;
import biz.obake.team.touchprotector.qstile.QSTileSettingsService;

public class Tab_Notification extends a {
    public void onCreatePreferences(Bundle bundle, String str) {
        setPreferencesFromResource(R.xml.ui_tab_notification, str);
    }

    /* access modifiers changed from: protected */
    public void onPrefChanged(SharedPreferences sharedPreferences, String str) {
        if (Build.VERSION.SDK_INT >= 24) {
            char c2 = 65535;
            int hashCode = str.hashCode();
            if (hashCode != -401328206) {
                if (hashCode != 1127637050) {
                    if (hashCode == 1518954249 && str.equals("qstile_sensor")) {
                        c2 = 2;
                    }
                } else if (str.equals("qstile_lock")) {
                    c2 = 1;
                }
            } else if (str.equals("qstile_settings")) {
                c2 = 0;
            }
            if (c2 == 0) {
                QSTileSettingsService.a(a.g("qstile_settings"));
            } else if (c2 == 1) {
                QSTileLockService.a(a.g("qstile_lock"));
            } else if (c2 == 2) {
                QSTileSensorService.a(a.g("qstile_sensor"));
            }
        }
    }

    /* access modifiers changed from: protected */
    public void onUpdateDisplay() {
        ListPreference listPreference = (ListPreference) getPreferenceScreen().H0("action_buttons");
        listPreference.v0(listPreference.N0());
        getPreferenceScreen().H0("notif_lock_delay").v0(c.w(R.string.pref_notif_lock_delay_summary).replace("{0}", Double.toString(((double) a.j("notif_lock_delay")) / 1000.0d)));
    }
}
